package com.pxst.merchant.controller;

import com.pxst.merchant.req.MerchantDailyReportReq;
import com.pxst.merchant.req.MerchantSummaryReportReq;
import com.pxst.merchant.resp.MerchantDailyReportResp;
import com.pxst.merchant.resp.MerchantSummaryReportResp;
import com.pxst.merchant.service.SysMerchantIncomeStatisticsService;
import com.pxst.resp.ApiResp;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* @author zarke
* @since 2023-09-18 15:18:54
*/
@RestController
@RequestMapping("/api/merchant/income")
@Api(tags = "代理-每日报表，代理收入总表")
public class SysMerchantIncomeStatisticsController {

    @Autowired
    private SysMerchantIncomeStatisticsService sysMerchantIncomeStatisticsService;

    @GetMapping("/dailyReport")
    @ApiOperation(value = "每日报表-搜索")
    public ApiResp<MerchantDailyReportResp> getDailyReport(MerchantDailyReportReq merchantIncomeReq) {
        return sysMerchantIncomeStatisticsService.getDailyReport(merchantIncomeReq);
    }

    @GetMapping("/summaryReport")
    @ApiOperation(value = "代理收入总表-搜索")
    public ApiResp<MerchantSummaryReportResp> getSummaryReport(MerchantSummaryReportReq merchantIncomeReq) {
        return sysMerchantIncomeStatisticsService.getSummaryReport(merchantIncomeReq);
    }
}
